/*
 * $Id$
 *
 * Copyright 2008 HuangHuang. All rights reserved.
 */

package com.crm.model;

import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * 选择列表。
 *
 * @author <a href="mailto:huang0510@hotmail.com">HuangHuang</a>
 * @version $Id$
 */
public class Listbox implements Serializable {

    private String id;
    private String name;
    private String parentId;

    public Listbox() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Listbox)) return false;
        Listbox that = (Listbox) o;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null)
            return false;
        return true;
    }

    public String toString() {
        return new ToStringBuilder(this).
                append("id", id).
                append("name", name).
                append("parentId", parentId).
                toString();
    }
}
